package com.googlecode.maurersmarbles;

public class Marble {

	/**
	 * The marble's board index (space on the board).
	 */
	protected int boardIndex;
	/**
	 * The marble's number.
	 */
	protected final int marbleNumber;
	/**
	 * The marble's player number.
	 */
	protected final int playerNumber;

	/**
	 * Creates a new marble.
	 * @param playerNumber the marble's player number
	 * @param marbleNumber the marble's number
	 * @param boardIndex the marble's board index (space on the board)
	 */
	public Marble(int playerNumber, int marbleNumber, int boardIndex) {
		this.playerNumber = playerNumber;
		this.marbleNumber = marbleNumber;
		this.boardIndex = boardIndex;
	}

	/**
	 * Returns the marble's board index (space on the board).
	 * @return the marble's board index (space on the board)
	 */
	public int getBoardIndex() {
		return boardIndex;
	}

	/**
	 * Sets the marble's board index (space on the board).
	 * @param boardIndex the marble's board index (space on the board)
	 */
	public void setBoardIndex(int boardIndex) {
		this.boardIndex = boardIndex;
	}

	/**
	 * Returns the marble's number.
	 * @return the marble's number
	 */
	public int getMarbleNumber() {
		return marbleNumber;
	}

	/**
	 * Returns the marble's player number.
	 * @return the marble's player number
	 */
	public int getPlayerNumber() {
		return playerNumber;
	}

}
